' Load 15-Minute bars.
Dim oBarIntvl As NewBarInterval(ChartInterval.Minute, 15)
If Not moMarket Is Nothing Then
' Load the data for the selected market.
moBarData = New ChartDataSeries(moMarket, oBarIntvl, SessionTimeRange.Empty)
' Request the chart data and subscribe for updates.
moBarData.LoadRealTimeChartData(dtStartDate)
' Alternatively, load only load historical chart data.
'moBarData.LoadHistoricalChartData(dtStartDate, dtEndDate)
Else
' Load "continuation" data for the contract.
Dim oContinuation As New ContinuationSettings()
moBarData = New ChartDataSeries(moSelectedContract, oBarIntvl, SessionTimeRange.Empty, oContinuation)
' Request the chart data and subscribe for updates.
moBarData.LoadRealTimeChartData(dtStartDate)
' Alternatively, load only load historical chart data.
'moBarData.LoadHistoricalChartData(dtStartDate, dtEndDate)
End If